<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class User extends CI_Controller
{
    private $TB;

    function __construct()
    {
        parent::__construct();
        $this->load->library('Taobao/TopSdk') ;
        $this->TB = new TopClient;
        $this->TB->appkey = $this->config->item('tb_akey');
        $this->TB->secretKey = $this->config->item('tb_skey');
    }

    public function info()
    {
        $req = new UserBuyerGetRequest;
        $req->setFields("nick,sex");
        $resp = $this->TB->execute($req, $this->session->userdata('token'));
        print_r($resp);
    }
}